package org.database.filter.service.impl;

import java.util.List;

import org.database.filter.model.MySynsetWord;
import org.database.filter.repository.MySynsetWordRepository;
import org.database.filter.service.MySynsetWordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class MySynsetWordServiceImpl implements MySynsetWordService {
	@Autowired
	private MySynsetWordRepository mySynsetWordRepository;

	public List<MySynsetWord> getSynsetWordBySynsetId(long synset_id) {
		return mySynsetWordRepository.getSynsetWordBySynsetId(synset_id);
	}

	@Override
	public void saveOrUpdate(MySynsetWord word) {
		mySynsetWordRepository.save(word);
	}
}
